<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="exporter-version" content=mNote Mac 2.4.10"/><meta name="created" content="2013-07-29T13:56:00Z"/><meta name="updated" content="2013-07-29T13:56:00Z"/><title>Raspbian apt</title></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><td style="border: 0px none rgb(68, 68, 68); color: rgb(68, 68, 68); display: table-cell; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 785px; outline: rgb(68, 68, 68) none 0px; padding: 0px; text-decoration: initial; vertical-align: middle; width: 757px; word-wrap: break-word;">
apt-get的速度当然是越快越好了，但是有些时候就是会出现10KB/s甚至更少的速度<br>
<br>
究其原因，是因为官方放在Raspbian里的软件源地址，其实只是一个跳转入口。<br>
这个入口根据负载均衡和地理位置考虑，将用户301送到合适的镜像站<br>
但是跳转既然是机器做的，就不可能100%合适和可靠。别说慢了，偶尔down都有可能。我昨天早晨还刚撞到一次清华的服务器停机了一会儿……<br>
<br>
碰到这种郁闷情况，可以考虑手工指定一个镜像站代替机器选择。<br>
<br>
镜像站列表：<a href="http://www.raspbian.org/RaspbianMirrors" target="_blank" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: underline; word-wrap: break-word;">http://www.raspbian.org/RaspbianMirrors</a><br>
然后点击试试，或者ping甚至下载测试都行，总之找个快的。推荐清华大学或者新加坡国立大学的服务器<br>
<div style="background-image: url(http://bbs.shumeipai.org/static/image/common/icon_quote_s.gif); background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(249, 249, 249); background-size: auto; border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 115px; margin: 10px 0px; outline: rgb(102, 102, 102) none 0px; overflow: hidden; padding: 10px 10px 5px 65px; text-decoration: initial; width: 682px; word-wrap: break-word; background-position: 20px 6px; background-repeat: no-repeat no-repeat;"><blockquote style="background-image: url(http://bbs.shumeipai.org/static/image/common/icon_quote_e.gif); background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-size: auto; border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: inline-block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 22px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 110px; margin: 0px; outline: rgb(102, 102, 102) none 0px; padding: 0px 65px 5px 0px; text-decoration: initial; width: 478px; word-wrap: break-word; background-position: 100% 100%; background-repeat: no-repeat no-repeat;">清华大学 <a href="http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/" target="_blank" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 22px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: underline; word-wrap: break-word;">http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/</a><br>
新加坡国立大学 <a href="http://mirror.nus.edu.sg/raspbian/raspbian" target="_blank" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 22px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: underline; word-wrap: break-word;">http://mirror.nus.edu.sg/raspbian/raspbian</a><br>
牛津大学 <a href="http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/" target="_blank" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 22px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: underline; word-wrap: break-word;">http://mirror.ox.ac.uk/sites/arc ... g/archive/raspbian/</a><br>
韩国Neowiz Games (穿越火线公司) <a href="http://ftp.neowiz.com/raspbian/raspbian/" target="_blank" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 22px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: underline; word-wrap: break-word;">http://ftp.neowiz.com/raspbian/raspbian/</a> <br>
韩国KAIST大学 <a href="http://ftp.kaist.ac.kr/raspbian/raspbian/" target="_blank" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 22px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: underline; word-wrap: break-word;">http://ftp.kaist.ac.kr/raspbian/raspbian/</a></blockquote></div><br>
复制下软件源地址，改软件源列表文件：sudo nano /etc/apt/sources.list<div style="background-image: url(http://bbs.shumeipai.org/static/image/common/codebg.gif); background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(247, 247, 247); background-size: auto; border: 1px solid rgb(204, 204, 204); color: rgb(102, 102, 102); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 144px; margin: 10px 0px; outline: rgb(102, 102, 102) none 0px; overflow: hidden; padding: 10px 0px 5px 10px; text-decoration: initial; width: 745px; word-wrap: break-word; background-position: 0px 0px; background-repeat: no-repeat repeat;"><div style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 126px; margin: 0px; outline: rgb(102, 102, 102) none 0px; padding: 0px; text-decoration: initial; width: 745px; word-wrap: break-word;"><ol style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 126px; margin: 0px 0px 0px 10px; outline: rgb(102, 102, 102) none 0px; padding: 0px; text-decoration: initial; width: 735px; word-wrap: break-word; list-style: decimal outside none;"><li style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 21.59375px; font-family: Monaco, Consolas, 'Lucida Console', 'Courier New', serif; height: 21px; margin: 0px 0px 0px 24px; outline: rgb(102, 102, 102) none 0px; padding: 0px 0px 0px 10px; text-align: left; text-decoration: initial; width: 701px; word-wrap: break-word; list-style: decimal-leading-zero outside none;"># 注释掉原来这行<br>
</li><li style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 21.59375px; font-family: Monaco, Consolas, 'Lucida Console', 'Courier New', serif; height: 21px; margin: 0px 0px 0px 24px; outline: rgb(102, 102, 102) none 0px; padding: 0px 0px 0px 10px; text-align: left; text-decoration: initial; width: 701px; word-wrap: break-word; list-style: decimal-leading-zero outside none;">#deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi<br>
</li><li style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 21.59375px; font-family: Monaco, Consolas, 'Lucida Console', 'Courier New', serif; height: 21px; margin: 0px 0px 0px 24px; outline: rgb(102, 102, 102) none 0px; padding: 0px 0px 0px 10px; text-align: left; text-decoration: initial; width: 701px; word-wrap: break-word; list-style: decimal-leading-zero outside none;"><br>
</li><li style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 21.59375px; font-family: Monaco, Consolas, 'Lucida Console', 'Courier New', serif; height: 21px; margin: 0px 0px 0px 24px; outline: rgb(102, 102, 102) none 0px; padding: 0px 0px 0px 10px; text-align: left; text-decoration: initial; width: 701px; word-wrap: break-word; list-style: decimal-leading-zero outside none;"># 加入新的一行<br>
</li><li style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 21.59375px; font-family: Monaco, Consolas, 'Lucida Console', 'Courier New', serif; height: 21px; margin: 0px 0px 0px 24px; outline: rgb(102, 102, 102) none 0px; padding: 0px 0px 0px 10px; text-align: left; text-decoration: initial; width: 701px; word-wrap: break-word; list-style: decimal-leading-zero outside none;">deb 镜像站地址 wheezy main contrib non-free rpi<br>
</li><li style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 21.59375px; font-family: Monaco, Consolas, 'Lucida Console', 'Courier New', serif; height: 21px; margin: 0px 0px 0px 24px; outline: rgb(102, 102, 102) none 0px; padding: 0px 0px 0px 10px; text-align: left; text-decoration: initial; width: 701px; word-wrap: break-word; list-style: decimal-leading-zero outside none;"></li></ol></div><em onclick="copycode($('code_s2f'));" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); cursor: pointer; display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 18px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px 0px 0px 43px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: initial; word-wrap: break-word;">复制代码</em></div>（Ctrl+X退出，答Yes存盘）<br>
<br>
修改后务必更新一下软件包列表。<div style="background-image: url(http://bbs.shumeipai.org/static/image/common/codebg.gif); background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(247, 247, 247); background-size: auto; border: 1px solid rgb(204, 204, 204); color: rgb(102, 102, 102); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 39px; margin: 10px 0px; outline: rgb(102, 102, 102) none 0px; overflow: hidden; padding: 10px 0px 5px 10px; text-decoration: initial; width: 745px; word-wrap: break-word; background-position: 0px 0px; background-repeat: no-repeat repeat;"><div style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 21px; margin: 0px; outline: rgb(102, 102, 102) none 0px; padding: 0px; text-decoration: initial; width: 745px; word-wrap: break-word;"><ol style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: 21px; font-family: Tahoma, Helvetica, SimSun, sans-serif; height: 21px; margin: 0px 0px 0px 10px; outline: rgb(102, 102, 102) none 0px; padding: 0px; text-decoration: initial; width: 735px; word-wrap: break-word; list-style: decimal outside none;"><li style="border: 0px none rgb(102, 102, 102); color: rgb(102, 102, 102); display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 21.59375px; font-family: Monaco, Consolas, 'Lucida Console', 'Courier New', serif; height: 21px; margin: 0px 0px 0px 24px; outline: rgb(102, 102, 102) none 0px; padding: 0px 0px 0px 10px; text-align: left; text-decoration: initial; width: 701px; word-wrap: break-word; list-style: decimal-leading-zero outside none;">apt-get update</li></ol></div><em onclick="copycode($('code_g11'));" style="border: 0px none rgb(51, 102, 153); color: rgb(51, 102, 153); cursor: pointer; display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 18px; font-family: Tahoma, Helvetica, SimSun, sans-serif; margin: 0px 0px 0px 43px; outline: rgb(51, 102, 153) none 0px; padding: 0px; text-decoration: initial; word-wrap: break-word;">复制代码</em></div>如果不更新，install命令会出莫名其妙的问题。<br>
另外此时也可以看一眼，系统使用的镜像站网址是否和我们修改的一致。<br>
</td></div></body></html>